<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        header{
            height:900px;
            width: 100%;
            position: relative;
        }
        header .center{
            position: absolute;
            width: 100%;
            height: 600px;
            bottom: 0;
            background-color: cadetblue;
        }
        header .center .center_bottom .bottom_main .bm_left img {
            width: 50px;
            border-radius: 50%;
            vertical-align: bottom;
        }

        header .center {
            background-color: bisque;
            border-radius: 25px 25px 0 0 ;
            text-align: center;
            height: 500px;
            width: 100%;
            border-radius: 2%;
        }
        header .center .top{
            border-bottom: 3px solid sandybrown;
            height: 80px;
        }

        header .center .top h3 {
            line-height: 60px;
            text-align: center;
            font-size: 22px;
            height: 40px;
        }
        header .center .top p{
            margin: 10px auto;
        }

        header .center_bottom {
            width: 94%;
            margin: 0 auto;
            height: 40vh;
        }

        header .center .center_bottom .bottom_main {
            margin: 20px auto;
            height: 80px;
            width: 100%;
            border-radius: 10px;
            background-color: rgb(241, 241, 241);
            display: flex;
            align-items: center;
            justify-content: space-around;
        }

        header .center .center_bottom .bottom_main .bm_left {
            position: relative;
        }

        header .center .center_bottom .bottom_main .bm_left p {
            position: absolute;
            bottom: 5px;
            background-color: rgba(240, 248, 255, 0.373);
            color: white;
            width: 100%;
        }

        header .center .center_bottom .bottom_main .bm_right button {
            width: 100px;
            height: 40px;
            background-color: rgb(235, 152, 19);
            border-radius: 20px;
            color: white;
            font-size: 18px;
        }
    </style>
</head>
<body>
    <header id="app">
        <div class="center">
            <div class="top">
                <h3>任务列表</h3>
                <p>每完成一个任务,可获得10MB~1GB流量</p>
            </div>
            <div class="center_bottom">
                <div class="bottom_main item" v-for="(item,index) in tasklist" v-bind:key = "index" >
                    <div class="bm_left">
                        <img v-bind:src="item.pic" alt="">
                        
                    </div>
                    <div class="bm_content">
                        <p >{{item.name}}</p>
                        <p >{{item.desc}}</p>
                    </div>
                    <div class="bm_right">
                        <button>{{item.status == 1 ?'去完成': (item,status == 2? '领取':'已领取')}}</button>
                    </div>
                </div>
            </div>
        </div>
    </header>
</body>
</html>
<script src="vue-2.5.21.js"></script>
<script>
    let v = new Vue({
        el : '#app',
        data:{
            tasklist:[
                { id: 1, pic: './img/1.jpg', name: '咪咕视频流量', desc: '咪咕视频流量',status: 1 },
                { id: 2, pic: './img/1.jpg', name: '咪咕视频流量', desc: '咪咕视频流量',status: 2 },
                { id: 3, pic: './img/1.jpg', name: '咪咕视频流量', desc: '咪咕视频流量',status: 3 },
                { id: 4, pic: './img/1.jpg', name: '咪咕视频流量', desc: '咪咕视频流量',status: 3 },
           
            ],
        }
    })
</script>